package com.charles.seckillComponentSecurity.utils.auth;

import com.charles.seckillData.model.UserLogin;

/**
 * @author Charles-H
 * 
 * 权限验证工具类
 */
public class AuthVerifyUtil {

    public static AuthVerify authVerify = new AuthVerify();

    /**
     * 注销会话
     */
    public static void logOut() {
        authVerify.logOut();
    }

    /**
     * 通过token令牌注销会话
     */
    public static void logOutByToken(String token) {
        authVerify.logOutByToken(token);
    }

    /**
     * 判断当前用户是否登录
     */
    public static void isLogin() {
        authVerify.isLogin();
    }

    /**
     * 获取当前用户
     */
    public static UserLogin getUserLogin(String token) {
        return authVerify.getUserLogin(token);
    }

    /**
     * 验证当前用户有效期
     */
    public static void checkUserLogin(UserLogin userLogin) {
        authVerify.checkUserLogin(userLogin);
    }

}
